<!-- 小程序管理 -->
<template>
  <a-card
    style="width: 100%"
    :tab-list="tabListNoTitle"
    :active-tab-key="titleKey"
    @tabChange="(key) => onTabChange(key)"
    :bordered="false"
    class="br-10"
  >
    <div v-if="titleKey === 'authorization'">
      <Authorization />
    </div>
    <div v-else-if="titleKey === 'domain'">
      <Domain />
    </div>
  </a-card>
</template>

<script>
import Authorization from './components/authorization'
import Domain from './components/domain'
export default {
  components: {
    Authorization,
    Domain,
  },
  data() {
    return {
      tabListNoTitle: [
        {
          key: 'authorization',
          tab: '开放平台授权',
        },
        {
          key: 'domain',
          tab: '配置业务域名',
        },
      ],
      titleKey: 'authorization',
    }
  },
  methods: {
    onTabChange(key) {
      this.titleKey = key
    },
  },
}
</script>